package com.stox.client.ui.javafx.chartingy.event.listener;

import javafx.event.EventHandler;
import javafx.scene.input.ScrollEvent;

import com.stox.client.ui.javafx.chartingy.view.ChartingView;

public class ZoomEventListener implements EventHandler<ScrollEvent> {

	private double step = 5;
	private final ChartingView chartingView;

	public ZoomEventListener(final ChartingView chartingView) {
		this.chartingView = chartingView;
		chartingView.addEventFilter(ScrollEvent.SCROLL, this);
	}

	@Override
	public void handle(final ScrollEvent event) {
		System.out.println(event);
	}

	public ChartingView getChartingView() {
		return chartingView;
	}

	public double getStep() {
		return step;
	}

	public void setStep(final double step) {
		this.step = step;
	}

}
